﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Projet_Synthese
{
    public class Carre : Parallelogramme
    {
        public Carre(Texture2D[] texture, Rectangle destination)
            : base(texture, IdTexture.Carre, new Rectangle(0, 0, 59, 59), destination)
        {
        }
        public override string Name
        {
            get { return "Carre"; }
        }
        protected override bool testProcheAvecRotation(float angle1, float angle2)
        {
            float diffRatation = Math.Abs(angle1 - angle2) % MathHelper.PiOver2;
            Console.WriteLine(diffRatation);
            return diffRatation < THETAANGLE || Math.Abs(diffRatation - MathHelper.PiOver2) < THETAANGLE;
        }
    }
}
